🎖️GitЯра🎖️
.agent_memory/session_context.md 449cbd4dd128fdef5f1f1243e62e1aaa97136db7 (449cbd4d) Text, 11.29 KB
Agent Session Context - Meshtastic Android
Dated handover log. Add new entries at the TOP. Format: ## YYYY-MM-DD — <summary>
Capped at the ~5 most recent entries — skim the top entry for current state; you do
not need to read the whole file. When adding an entry pushes the count past ~5, move
the oldest entries to T383838session_context.archive.md (not read by default). The
"Golden Context" block at the bottom is stable across sessions; keep it here.
2026-06-03 — Cluster-marker FATAL: revert shipped map series + in-scope rememberComposeBitmapDescriptor fix
• Reverted ALL google-flavor map changes to before #5684 (per user): restored MapView.kt, NodeClusterMarkers.kt, WaypointMarkers.kt, InlineMap.kt to parent commit bc9f1637; deleted MarkerBitmapRenderer.kt; re-pinned T383838play-services-maps = 20.0.0 in libs.versions.toml. The shipped #5702–#5719 series (Canvas markers + ViewTree-owner band-aids) had lost the info-window popups + interactions.
• Root cause (verified against maps-compose 8.3.0 + android-maps-utils 4.1.1 SOURCE in gradle cache): ONLY T383838Clustering(clusterItemContent=…) crashes — its T383838ComposeUiClusterRenderer builds a detached T383838InvalidatingComposeView with a fake lifecycle owner and NO SavedStateRegistryOwner. T383838MarkerComposable already bakes its icon via the safe in-scope T383838rememberComposeBitmapDescriptor; info windows render with the live marker compositionContext. So InlineMap/NodeTrack/Traceroute were left untouched.
• Fix (NodeClusterMarkers.kt ONLY): icons baked in-scope via T383838rememberComposeBitmapDescriptor(node){ PulsingNodeChip } into a snapshot stateMap; custom T383838private class NodeClusterRenderer : DefaultClusterRenderer assigns them in onBeforeClusterItemRendered/onClusterItemUpdated (bg thread, READ-only — never composes, so the crash class is gone). Native info windows (super sets title/snippet) + onClusterItemInfoWindowClick→navigateToNodeDetails; precision circles drawn from the renderer's own T383838unclusteredItems MutableState (clusterItemDecoration can't fire — T383838ClusterRendererItemState is lib-internal). Strictly better than the elegant-euler Canvas branch — keeps the REAL Compose chip.
• T383838compileGoogleDebugKotlin + T383838spotlessCheck + T383838detekt PASS. NOT committed, NOT device-verified. Next: device-test (clusters show chips + info-window popups + no FATAL), then commit/push.
2026-05-28 — Added comprehensive CarScreenDataBuilder unit coverage
• Created T383838feature/car/src/test/kotlin/org/meshtastic/feature/car/util/CarScreenDataBuilderTest.kt with 533 lines covering signal quality thresholds/boundaries, node UI mapping, node and conversation sorting, local stats fallbacks, uptime formatting, recent message limiting, contact key generation, and constants.
• Restored the T383838MessageSnapshot data class in T383838CarStateCoordinator.kt and re-added T383838recentMessages() plus T383838MAX_CONVERSATION_MESSAGES in T383838CarScreenDataBuilder.kt so the current source matched the requested pure-helper API surface for testing.
• Verified with T383838./gradlew :feature:car:spotlessCheck :feature:car:detekt :feature:car:testFdroidDebugUnitTest --quiet and the requested quiet test command (T383838./gradlew :feature:car:testFdroidDebugUnitTest --quiet 2>&1 | tail -20), both successful.
2026-05-28 — Lowered car min API to 7 and removed dead conversation code
• Changed T383838feature/car manifest T383838androidx.car.app.minCarApiLevel metadata from 8 to 7.
• Guarded T383838HomeScreen.showEmergencyAlert() behind T383838carContext.carAppApiLevel >= 8 and logged unsupported API 7 hosts with Kermit.
• Removed unused T383838ConversationScreen, T383838CarTtsEngine, message snapshot/cache/read-aloud plumbing, and now-unused car reply/read-aloud strings.
• Simplified T383838CarStateCoordinator and T383838CarScreenDataBuilder to match the inline T383838ConversationItem flow.
• Verified with T383838./gradlew :feature:car:spotlessApply :feature:car:spotlessCheck :feature:car:detekt :feature:car:compileFdroidDebugKotlin --quiet 2>&1 | tail -30.
2026-05-28 — Migrated car home messages tab to ConversationItem
• Reworked T383838feature/car T383838HomeScreen messaging tab to build CAL T383838ConversationItem entries instead of browsable T383838Rows, including T383838Person/T383838CarMessage helpers and native reply/mark-read callbacks.
• Removed T383838HomeScreen conversation navigation so the car host owns messaging affordances; T383838ConversationScreen remains on disk for later cleanup phases.
• Added T383838CarStateCoordinator.markAsRead() using T383838packetRepository.clearUnreadCount(...) with Kermit error logging via T383838runCatching.
• Verified with T383838./gradlew :feature:car:spotlessApply :feature:car:spotlessCheck :feature:car:detekt :feature:car:compileFdroidDebugKotlin and the requested quiet compile command (T383838:feature:car:compileFdroidDebugKotlin --quiet 2>&1 | tail -20), both successful.
2026-05-28 — Implemented car conversation shortcuts and avatars
• Added T383838feature/car/.../util/PersonIconFactory.kt to render circular initial avatars using node-derived foreground/background colors for T383838Person and shortcut icons.
• Added T383838feature/car/.../service/ConversationShortcutManager.kt to publish long-lived dynamic conversation shortcuts for favorite nodes and active channels, plus on-demand shortcut creation for notifications.
• Wired T383838MeshtasticCarSession to start/stop shortcut observation on a dedicated session coroutine scope.
• Updated T383838CarNotificationManager to ensure conversation shortcuts exist before posting and to attach both T383838shortcutId and T383838LocusIdCompat to messaging notifications.
• Verified green with T383838./gradlew :feature:car:spotlessCheck :feature:car:detekt --quiet and T383838./gradlew :feature:car:compileFdroidDebugKotlin --quiet 2>&1 | tail -20 after workspace bootstrap.
2026-05-28 — Implemented car local stats tab and extracted screen data builder
• Added T383838CarLocalStats to T383838feature/car UI models and exposed T383838localStatsState from T383838CarStateCoordinator.
• Wired a new HomeScreen T383838Status tab with battery, channel utilization, air utilization, node counts, uptime, and packet TX/RX rows.
• Created T383838feature/car/.../util/CarScreenDataBuilder.kt to centralize pure UI-model mapping helpers for nodes, conversations, local stats, uptime formatting, contact key building, and recent message selection.
• Added the new T383838ic_car_status.xml drawable plus status strings in T383838feature/car/src/main/res/values/strings.xml.
• Cleaned up T383838CarReplyReceiver detekt violations that blocked module validation.
• Ran T383838python3 scripts/sort-strings.py and verified green with T383838./gradlew :feature:car:spotlessApply :feature:car:spotlessCheck :feature:car:detekt :feature:car:compileFdroidDebugKotlin :feature:car:testFdroidDebugUnitTest.
2026-05-28 — Implemented car module Phase 1 messaging wiring fixes
• Replaced T383838CommandSender usage in T383838feature/car T383838CarStateCoordinator with injected T383838SendMessageUseCase, keeping the public T383838sendMessage() API synchronous for UI callbacks while launching the use case on the coordinator scope after message-length validation.
• Updated T383838CarNotificationManager reply and mark-read notification actions with semantic action metadata and T383838setShowsUserInterface(false) for automotive-friendly inline handling.
• Reworked T383838CarReplyReceiver into a T383838KoinComponent that injects T383838SendMessageUseCase and T383838PacketRepository, then sends replies / clears unread counts asynchronously with Kermit error logging.
• Added T383838android:permission="androidx.car.app.CarAppService" to the T383838MeshtasticCarAppService manifest declaration.
• Verified with T383838./gradlew :feature:car:compileFdroidDebugKotlin --quiet after required workspace bootstrap.
2026-05-21 — Upgraded Chirpy to a fully-personalized Live Diagnostic Node & Mesh Assistant
• Integrated T383838NodeRepository into T383838GeminiNanoDocAssistant.kt and the Google AI Koin dependency injection module (T383838GoogleAiModule.kt).
• Developed a dynamic live-state prompt formatting block within T383838buildPrompt(...) that queries current hardware model, firmware version, connection status, GPS capability, channel utilization, airtime, battery level/voltage, user profile long/short names, and total registered mesh peer counts & active online peers directly from T383838NodeRepository's reactive flows.
• Injected this live radio diagnostics context dynamically as a system instruction metadata block on every user query. This empowers the on-device model to answer real-time, personalized diagnostic questions (e.g. "what is my battery level?", "how many active nodes are on my mesh right now?") with 100% on-device offline accuracy.
• Tuned context retrieval constraints for the modern T383838nano-v4-full (Gemini Nano v4) model: expanded the total context budget T383838MAX_CONTEXT_CHARS from 8,000 to 32,000 characters (up to ~12K tokens out of the model's native 32K window), and scaled T383838MAX_PAGE_CHARS to 16,000 characters and T383838MAX_SNIPPET_CHARS to 8,000 characters to supply vastly richer, more detailed, and complete documentation fragments.
2026-05-21 — Activated full on-device token streaming and polished Chirpy's personality instructions
• Upgraded the on-device inference flow inside T383838GeminiNanoDocAssistant.kt to use Firebase AI SDK's reactive T383838generateContentStream(prompt) instead of the blocking T383838generateContent invocation.
• Aggregated chunks and emitted incremental T383838AIDocAssistantResult.Partial states down the Kotlin Flow, enabling true word-by-word/chunk-by-chunk streaming in the UI for a much more responsive user experience.
• Refined the T383838SYSTEM_INSTRUCTION personality rules for Chirpy to position him as our adorable LoRa radio Node mascot instead of an avian theme, emphasizing high-enthusiasm mesh networking, signal connectivity, battery status, and radio/routing concepts while preserving technical precision.
• Overhauled system error messages inside T383838DocsNavigation.kt and the loading bubble state inside T383838ChirpyAssistantSheet.kt to align with the mascot theme.
2026-05-21 — Implemented streaming chat support and Firebase Remote Config integration for Chirpy
• Added T383838firebase-config dependency to Version Catalog T383838libs.versions.toml and T383838androidApp/build.gradle.kts.
• Added the T383838AIDocAssistantResult.Partial variant to support intermediate stream updates.
• Extended the T383838AIDocAssistant interface and implemented T383838answerStream in both T383838KeywordFallbackAssistant and T383838GeminiNanoDocAssistant.
• Integrated Firebase Remote Config into T383838GeminiNanoDocAssistant to dynamically fetch the model name (T383838chirpy_model_name) and system instruction (T383838chirpy_system_instruction) with release-optimized fetch intervals.
• Refactored T383838GeminiNanoDocAssistant.answer to reuse T383838answerStream flow under the hood, eliminating duplicate prompting code.
• Verified that all unit tests (T383838:feature:docs:allTests) and static analysis checks (T383838spotlessApply spotlessCheck detekt) pass 100% green.
Golden Context (stable across sessions)
• Always check T383838.skills/compose-ui/strings-index.txt before reading T383838strings.xml.
• Run T383838python3 scripts/sort-strings.py after adding strings to keep the index organized.
• Always check T383838gh run list before pushing.
• Pre-commit hook T383838scripts/ai-guardrail.sh protects against binary leaks (see script for install).
<!-- Older entries archived in session_context.archive.md -->
Served by rngit 1.5.2 - Generated in 0.03s